package com.ftg.learn.system.controller;

import com.ftg.learn.util.config.OssUtil;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.util.UUID;

/**
 * 测试 上传功能
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/5/16 下午3:04
 */
@Api(tags = "上传功能")
@RequestMapping("/api/system/upload")
@RestController
public class UploadDemo {

    @Resource
    OssUtil ossUtil;

    @PostMapping("/upload")
    public void testUpload(MultipartFile file){
        ossUtil.uploadFile(file,"pms-img-pp","/xiaomi/demo.png");
    }

}
